﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;


namespace ExcellentCRM.DataService.Models
{
    public class BaseModel
    {
        [Key, Column(Order = 0), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long Id { get; set; }

        [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
        public DateTime CreatedTime { get; set; }

        public DateTime LastModifiedTime { get; set; }

        public int StatusToken { get; set; }

        public int SortToken { get; set; }

        public BaseModel()
        {
            CreatedTime = DateTime.Now;
            LastModifiedTime = DateTime.Now;
            StatusToken = 1;
            SortToken = 0;
        }
    }
}